package Cafezam;

import java.util.Scanner;

public class J09Circle {
	
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		double radius[]= new double[2];
		double circleArea[]= new double[2];
		double perim[]= new double[2];
	    final double PI[]=new double[2];
		
		input(radius);
		area(circleArea, radius, PI);
		per(perim, radius, PI);
		
		System.out.println("면적"+circleArea[1]);
		System.out.println("둘레"+perim[1]);
		
		
		
/*		final double PI = 3.14;
		// 클래스 변수를 초기화 할때 null을 사용
		double radius = 0;
		double circleArea = 0;
		double perim = 0;
		System.out.println("반지름값 입력:");
		radius = sc.nextDouble();

		circleArea = radius * radius * PI;
		perim = radius * 2 * PI;

		System.out.println("원의 면적:" + circleArea);
		System.out.println("원의 둘레:" + perim);
*/	
		sc.close();

	}//main
	public static void input(double[] radius)
	{
		Scanner sc = new Scanner(System.in);
		System.out.println("반지름 값을 입력하시오");
		radius[1]=sc.nextDouble();
		sc.close();
	}
	public static void area(double[] circleArea,double[] radius,final double[] PI)
	{
		PI[1] =3.14;
		circleArea[1]=radius[1]*radius[1]*PI[1];
		
	}
	public static void per(double[] perim,double[] radius,final double[] PI)
	{
		PI[1] =3.14;
		perim[1] = radius[1] * 2 * PI[1];
	}

}
